var width = argument0;
var height = argument1;

var module = moduleFactory(width + 2, height + 2);
var roomFloor = rectAreaFactory(width, height);
roomFloor.tileX = 1;
roomFloor.tileY = 1;
layerModule(module, roomFloor);

createWalls(module);

var player = instance_create(0, 0, obj_Player);
gameObjectConstructor(roomFloor.tileX + floor(width / 2), roomFloor.tileY + floor(height / 2),0,0,0,0, player);
combatantConstructor(100,100,100,100,100,100,100,4, player);

var fireBallFactory = instance_create(0,0,obj_RangedFactory);
fireBallEffects = 0;
fireBallEffects [0] = defaultPlayerDamage;
fireBallEffects [1] = deleteAttack;
fireBallTickers = 0;
fireBallTickers [0] = rangedDelete;
rangedConstructor("fireball", 0, spr_Fireball, spr_Fireball, fireBallEffects, fireBallTickers, 500, 1, 10, fireBallFactory);

addAttack(player, fireBallFactory);

var shockFactory = instance_create(0,0, obj_AOEFactory);
shockEffects = 0;
shockEffects [0] = defaultPlayerDamage;
shockTickers = 0;
shockTickers [0] = durationDelete;
AOEConstructor("shock", 0, spr_Shock, spr_Shock, shockEffects, shockTickers, 5000, 4000, shockFactory);

addAttack(player, shockFactory);

player.currentAttack = ds_list_find_value(player.attacks, 1);

var testCombatant = instance_create( 0 ,0, obj_NPCombatant);
testCombatant.sprite_index = spr_guard;
gameObjectConstructor(roomFloor.tileX + floor(width / 2) + 1, roomFloor.tileY + floor(height / 2) + 1,0,0,0,0, testCombatant);
combatantConstructor(100,100,100,100,100,100,100,0, testCombatant);
NPCombatantConstructor(0, testCombatant);

testCombatant.ai = strategyAIFactory(testCombatant);
